
import java.io.*;
import java.util.StringTokenizer;

/*
ID: huangmingbo
LANG: JAVA
TASK: barn1
 */
public class barn1 {
    public static void main(String[] args) throws IOException {
        try (
                BufferedReader reader = new BufferedReader(new InputStreamReader(barn1.class.getResourceAsStream(barn1.class.getSimpleName() + ".in")));
                PrintWriter writer = new PrintWriter(new FileWriter(barn1.class.getSimpleName() + ".out"));
        ) {
            StringTokenizer stringTokenizer = new StringTokenizer(reader.readLine());
            int M = Integer.parseInt(stringTokenizer.nextToken());
            int S = Integer.parseInt(stringTokenizer.nextToken());
            int C = Integer.parseInt(stringTokenizer.nextToken());
            int total = C;

            int[] periodIntervals = new int[S + 1];
            int[] stalls = new int[S + 1];

            for (int i = 0; i < C; i++) {
                stalls[Integer.parseInt(reader.readLine())]++;
            }

            boolean first = true;
            int currentPeriodEndNumber =0;
            int periodCount =0;
            for (int i = 0; i < S + 1; i++) {
                if (stalls[i] > 0) {
                    if (first) {
                        currentPeriodEndNumber = i;
                        periodCount++;
                        first = false;
                        continue;
                    }

                    if (i == currentPeriodEndNumber + 1) {
                        currentPeriodEndNumber++;
                        continue;
                    }

                    periodIntervals[i - currentPeriodEndNumber - 1]++;
                    currentPeriodEndNumber = i;
                    periodCount++;


                }
            }

            if (periodCount <= M) {
                writer.println(total);
                return;
            }

            int needBlockIntervaleCount = periodCount - M;
            for (int i = 0; i < S + 1; i++) {
                if (periodIntervals[i] > 0) {
                    if (needBlockIntervaleCount <= periodIntervals[i]) {
                        total += needBlockIntervaleCount * i;
                        writer.println(total);
                        return;
                    }

                    total += periodIntervals[i] * i;
                    needBlockIntervaleCount -= periodIntervals[i];
                }
            }


        }
    }
}
